<%@ page session="false" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/trinidad" prefix="tr"%>
<%@ taglib uri="http://myfaces.apache.org/trinidad/html" prefix="trh"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

<h:panelGroup>
	<table width="100%" border="0" style="margin-bottom: 10px" cellspacing="0" cellpadding="3">
		<tr>
		<td width="50">
			<tr:commandLink styleClass="back"
						shortDesc="Powrót" immediate="true">
				<tr:image source="gfx/icon_back.png" />
			</tr:commandLink>
		</td>
			<td align="left">
			<t:jscookMenu layout="hbr" theme="ThemeOffice" immediate="true">
				<t:navigationMenuItem itemLabel="Zamówienia">
					<t:navigationMenuItem itemLabel="Lista zamówień"
						rendered="#{currentUserTO.currentSalesman.permissionMap.ORDER_LIST}"
						action="#{NavigationUtil.goToOrderList}" />
					<t:navigationMenuItem itemLabel="Dodaj nowe zamówienie"
						rendered="#{currentUserTO.currentSalesman.permissionMap.ORDER_ADD}"
						action="#{NavigationUtil.goToNewOrderForm}" />
					<t:navigationMenuItem itemLabel="Wróć do zamówienia"
						rendered="#{false && currentUserTO.currentSalesman.permissionMap.ORDER_ADD}"
						action="#{NavigationUtil.goToOrderForm}" />
				</t:navigationMenuItem>
				<t:navigationMenuItem itemLabel="Parametryzacja">
					<t:navigationMenuItem itemLabel="Texty" action="#{NavigationUtil.goToTextList}"
										rendered="#{currentUserTO.currentSalesman.permissionMap.TEXT_LIST}"/>
					<t:navigationMenuItem itemLabel="Prowizje" action="#{NavigationUtil.goToPriceParameterList}" 
										rendered="#{currentUserTO.currentSalesman.permissionMap.PRICE_LIST}" />
				</t:navigationMenuItem>
				<t:navigationMenuItem itemLabel="Sprzedawcy">
					<t:navigationMenuItem itemLabel="Edycja" action="#{NavigationUtil.goToSalesmanList}"/>
					<t:navigationMenuItem itemLabel="Historia zmian" action="#{NavigationUtil.goToActivityList}"
										rendered="#{currentUserTO.currentSalesman.permissionMap.SALESMAN_ACTIVITY}"/>
				</t:navigationMenuItem>
			</t:jscookMenu>
			</td>
			<td align="center" style="font-size:16px;font-weight:bold;color:white">
					Rejestrator StudioGrafic&trade;
			</td>
			<td align="right">
				<tr:outputText value="#{currentUserTO.currentSalesman.personid.firstname} #{currentUserTO.currentSalesman.personid.surname} (#{currentUserTO.currentSalesman.login})" />
			</td>
			<td width="40" align="right">
				<tr:commandLink shortDesc="Wyloguj się" immediate="true" 
								inlineStyle="color:orange;font-size:11px" 
								action="#{NavigationUtil.logout}">
					<tr:image source="gfx/logout.png" />
				</tr:commandLink>
			</td>
		</tr>
	</table>

</h:panelGroup>